package com.cskaoyan.catmall.model.bo;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 创建日期: 2022-01-07-23-23
 * author : WQW
 * description: 修改商品类目信息接收参数
 */
@NoArgsConstructor
@Data
public class CateGoryUpdateBo {
    private Integer id;
    private String name;
    @NotNull(message = "关键字信息不能为空，且最长不能超过50个字符")
    @Length(min = 1,max = 100,message = "关键字信息不能为空，且最长不能超过50个字符")
    private String keywords;
    @Length(max = 100, message = "商品类目描述最长不能超过100个字符")
    private String desc;
    @NotNull(message = "商品类目图片信息不能为空")
    private String iconUrl;
    @NotNull(message = "商品类目图片信息不能为空")
    private String picUrl;
    private String level;
    private List<ChildrenDTO> children;
    private Integer pid;

    @NoArgsConstructor
    @Data
    public static class ChildrenDTO {
        private Integer id;
        private String name;
        private String keywords;
        private String desc;
        private String iconUrl;
        private String picUrl;
        private String level;
    }


}
